package com.ewzj.bigdata.app.extensions

import android.content.Intent
import com.jess.arms.base.BaseActivity
import com.jess.arms.mvp.BaseModel
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity
import okhttp3.RequestBody

/**
 * author:zhangjing
 * 作用:
 * return:
 */
 fun RxAppCompatActivity.startIntent(clazz: Class<Any>):Unit{
       val intent:Intent=Intent(this,clazz);
       startActivity(intent)
}
 fun BaseModel.json2Body(json:String):RequestBody{
     val requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), json)
     return requestBody
 }